Skip to content

Conversation

@asdullahsiddique
Copy link

I have added 2 more blade directives to improve the usability of @role Blade directive:

  • @elseifrole as you can guess you can add an elseif statements to @role
  • @elserole directive which translates to an else.
@role('admin')
    <p>This is visible to users with the admin role. Gets translated to 
    \Entrust::role('admin')</p>
@elseifrole('staff')
     <p>This is visible to users with the staff role. Gets translated to 
        \Entrust::role('staff')</p>
@elserole
     <p>This is visible to all the other roles./p>
@endrole

Cheers, Sid.

@asdullahsiddique
Copy link
Author

Checks were failing because of PHP version in composer.lock but now it's okay. @Zizaco

@matteoterzi
Copy link

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants